package cn.bone.ou.data.param;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

public class ArticleParam {

    @Data
    public static class ListParam{
        @NotNull
        private Integer communityId;
        @NotNull
        private Integer start;
        @NotNull
        private Integer num;
        private String title;
    }

    @Data
    public static class AddParam{
        @NotNull
        private Integer communityId;
        @NotNull
        @Length(min = 2,max=40)
        private String title;
        @NotNull
        private String content;
    }

    @Data
    public static class ModifyParam{
        @NotNull
        private Integer articleId;
        @NotNull
        @Length(min = 2,max=40)
        private String title;
        @NotNull
        private String content;
    }

    @Data
    public static class DetailParam{
        @NotNull
        private Integer articleId;
    }

    @Data
    public static class DeleteParam{
        @NotNull
        private Integer articleId;
    }
}
